const FM = {
   // 物业类型
  };
  const Formatter = function () {
    this.cache = FM;
  };
  Formatter.prototype.switchName = function (name, key) { //字段格式化查询
    let formatter = this.cache[name];
    return this.switchFormatter(formatter, key);
  };
  Formatter.prototype.switchFormatter = function (formatter, key) { //字段格式化查询
    if (!formatter) return key;
    if (formatter && formatter.length <= 0) return key;
    //let reg = new RegExp(String(key));
    for (let i = 0; i < formatter.length; i++) {
      if (String(key) === String(formatter[i].key)) {
        return formatter[i].value;
      }
    }
    return key;
  };
  export default new Formatter();